﻿@{
    ViewBag.Title = "家庭成员";
}
@section header{

}
<form id="form1">
    <div class="form-layout">
        <ul id="myTab" class="nav nav-tabs">
            <li class="active"><a href="#BaseInfo" id="NF-BaseInfo" data-toggle="tab">基础信息</a> </li>
            <li><a href="#EducationResume" id="NF-EducationResume" data-toggle="tab">教育经历</a></li>
            <li><a href="#Socialrelations" id="NF-Socialrelations" tabindex="-1" data-toggle="tab">家庭成员</a></li>
            <li><a href="#ProjectResume" id="NF-ProjectResume" tabindex="-1" data-toggle="tab">项目经验</a></li>
            <li><a href="#TrainResume" id="NF-TrainResume" tabindex="-1" data-toggle="tab">培训经历</a></li>
            <li><a href="#WorkResume" id="NF-WorkResume" tabindex="-1" data-toggle="tab">工作经验</a></li>
            <li class="dropdown">
                <a href="#" id="myTabDrop1" class="dropdown-toggle" data-toggle="dropdown"> 其他信息 <b class="caret"></b> </a>
                <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1">
                    <li><a href="#OrgTransfer"id="NF-OrgTransfer" tabindex="-1" data-toggle="tab">部门调动</a></li>
                </ul>
            </li>
        </ul>
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="BaseInfo">
                <iframe class="NFine_iframe" style="min-height:800px;width:100%;" src="/Rbac/User/Form?keyValue=@ViewBag.keyValue" frameborder="0"></iframe>
            </div>
            <div class="tab-pane fade" id="EducationResume">
                <iframe class="NFine_iframe" style="min-height:800px;width:100%;" src="/Personnel/EducationResume/Index?keyword=@ViewBag.keyValue" frameborder="0"></iframe>
            </div>
            <div class="tab-pane fade" id="Socialrelations">
                <iframe class="NFine_iframe" style="min-height:800px;width:100%;" src="/Personnel/Socialrelations/Index?keyword=@ViewBag.keyValue" frameborder="0"></iframe>
            </div>
            <div class="tab-pane fade" id="ProjectResume">
                <iframe class="NFine_iframe" style="min-height:800px;width:100%;" src="/Personnel/ProjectResume/Index?keyword=@ViewBag.keyValue" frameborder="0"></iframe>
            </div>
            <div class="tab-pane fade" id="TrainResume">
                <iframe class="NFine_iframe" style="min-height:800px;width:100%;" src="/Personnel/TrainResume/Index?keyword=@ViewBag.keyValue" frameborder="0"></iframe>
            </div>
            <div class="tab-pane fade" id="WorkResume">
                <iframe class="NFine_iframe" style="min-height:800px;width:100%;" src="/Personnel/WorkResume/Index?keyword=@ViewBag.keyValue" frameborder="0"></iframe>
            </div>
            <div class="tab-pane fade" id="OrgTransfer">
                <iframe class="NFine_iframe" style="min-height:800px;width:100%;" src="/Personnel/OrgTransfer/Index?keyword=@ViewBag.keyValue" frameborder="0"></iframe>
            </div>
        </div>
    </div>
</form>

@section scripts{
    <script>
        var keyValue = $.request("keyValue");
        $(function () {
            $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
                // 获取已激活的标签页的名称
                //var activeTab = $(e.target).text();
                var activeId = $(e.target).attr('id');
                var text_value = activeId.replace("NF-", "");
                console.log(text_value);
                var iframe = $('#myTabContent #' + text_value + ' .NFine_iframe');
                iframe.attr('src', iframe.attr('src'));
            });
        });
    </script>
}